nand, gpmc: fix reading after switching ecc
authorJeroen Hofstee <[email protected]>
Wed, 15 Jan 2014 16:58:54 +0000 (17:58 +0100)
committerTom Rini <[email protected]>
Fri, 17 Jan 2014 13:04:32 +0000 (08:04 -0500)
commit13fbde6e4f600d94f0a1fb6ae49c6b4888033cec
treee70db939b0ffe7fd66a3b4accf90fc25a98a85d4
parent09b72d692f4bce6716a255433b93c9ae2c4cc315
nand, gpmc: fix reading after switching ecc

The omap_gpmc allows switching ecc at runtime. Since
the NAND_SUBPAGE_READ flag is only set, it is kept when
switching to hw ecc, which is not correct. This leads to
calling chip->ecc.read_subpage which is not a valid
pointer. Therefore clear the flag when switching ecc so
reading in hw mode works again.

Cc: Scott Wood <[email protected]>
Cc: Pekon Gupta <[email protected]>
Cc: Nikita Kiryanov <[email protected]>
Signed-off-by: Jeroen Hofstee <[email protected]>
drivers/mtd/nand/omap_gpmc.c